/**
 * 
 */
package com.fsoft.tinhcd.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * @author caodangtinh
 * 
 */
@Entity
@Table(name = "Meeting", schema = "manytomany")
public class Metting {
	private int mettingId;
	private String subject;
	private Date mettingDate;
	private Set<Employee> employees = new HashSet<Employee>();

	public Metting() {

	}

	/**
	 * @param subject
	 * @param mettingDate
	 */
	public Metting(String subject, Date mettingDate) {
		super();
		this.subject = subject;
		this.mettingDate = mettingDate;
	}

	/**
	 * @return the mettingId
	 */
	@Id
	@GeneratedValue
	@Column(name = "METTING_ID")
	public int getMettingId() {
		return mettingId;
	}

	/**
	 * @param mettingId
	 *            the mettingId to set
	 */
	public void setMettingId(int mettingId) {
		this.mettingId = mettingId;
	}

	/**
	 * @return the subject
	 */
	@Column(name = "SUBJECT", length = 300)
	public String getSubject() {
		return subject;
	}

	/**
	 * @param subject
	 *            the subject to set
	 */
	public void setSubject(String subject) {
		this.subject = subject;
	}

	/**
	 * @return the mettingDate
	 */
	@Column(name = "METTING_DATE")
	public Date getMettingDate() {
		return mettingDate;
	}

	/**
	 * @param mettingDate
	 *            the mettingDate to set
	 */
	public void setMettingDate(Date mettingDate) {
		this.mettingDate = mettingDate;
	}

	/**
	 * @return the employees
	 */
	@ManyToMany(mappedBy = "mettings")
	public Set<Employee> getEmployees() {
		return employees;
	}

	/**
	 * @param employees
	 *            the employees to set
	 */
	public void setEmployees(Set<Employee> employees) {
		this.employees = employees;
	}

}
